package twel.probenprophet.base.utility;

import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.List;

public class Triple<T> {

	private final List<T> list = new ArrayList<T>();

	public Triple(T first, T second, T third) {
		list.add(first);
		list.add(second);
		list.add(third);
	}

	public T getFirst() {
		return list.get(0);
	}

	public T getSecond() {
		return list.get(1);
	}

	public T getThird() {
		return list.get(2);
	}

	public List<T> getList() {
		return new ArrayList<T>(list);
	}

	@Override
	public String toString() {
		return MessageFormat.format("({0}/{1}/{2})", getList().toArray());
	}
}
